package com.canadroid;

import java.util.ArrayList;

import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.opengl.texture.region.TextureRegion;

public class Building extends Sprite{
	
	public boolean isActive;
	public float posX;
	public float posY;
	
	public Building(float pX, float pY, float high, float width, TextureRegion pTextureRegion)
	{
		super( pX, pY, high, width, pTextureRegion);
		isActive = false;
			
	}
	
	@Override
    public void onManagedUpdate(final float dt) 
	{	
		if(this.getX()<0)
		{
			posX = this.getX() + 10 *dt;
		}
		else if(this.getX() > 800)
		{
			posX = this.getX() - 10 *dt;
		}
		this.setPosition(posX, this.getY());
    }
}
